<html>
<body>
// Include the JSONscriptRequest class
<script type="text/javascript" src="jsr_class.js"> </script>
<script type="text/javascript">

  // Define the callback function
  function getGeo(jsonData) {     
     //alert('Latitude = ' + jsonData.ResultSet.Result[0].Latitude + ' Longitude = ' + jsonData.ResultSet.Result[0].Longitude);
	 alert('Latitude = ' + jsonData.Error.Title);
     bObj.removeScriptTag(); 
  }

// The web service call
var req  = 'http://api.local.yahoo.com/MapsService/V1/geocode?appid=YahooDemo&output=json&callback=getGeo&location=94107'; 
// Create a new request object
bObj = new JSONscriptRequest(req); 
// Build the dynamic script tag
bObj.buildScriptTag(); 
// Add the script tag to the page
bObj.addScriptTag();
</script>

</body>
</html>